package cn.ac.iscas.dao.entity;

import com.iscas.datasong.lib.annotation.column.DSColumnSize;
import com.iscas.datasong.lib.annotation.column.DSColumnType;
import com.iscas.datasong.lib.common.column.ColumnType;

import java.util.Date;

/**
 * @author LJian
 * @version 1.0
 * @description: TODO
 * @date 2022/7/26 11:27
 */
public class ComponentMetadataDO {
    //@ApiModelProperty(value="组件唯一id",name="_id",example="linearregression",required=true)
    private String _id;
    //@ApiModelProperty(value="组件唯一名字，默认与id一致，需要时设置为组件入口类",name="entryClassName",example="linearregression",hidden=true)
    private String entryClassName;//入口类名称，如果不需要就是算法名字
    //@ApiModelProperty(value="组件前端展示名称",name="alias",example="线性回归算法")
    private String alias;//别名，前web端显示
    //@ApiModelProperty(value="组件描述信息",name="description",example="用于XXX的线性回归算法")
    private String description;//组件描述，用于hint提示
    //@ApiModelProperty(value="组件图标（暂未启用）",name="icon",example="test.png")
    private String icon;//对应的图标

    private String kind;//对应的图标

    //@ApiModelProperty(value="category",hidden=true)
    private String category;		//暂时没用到  组件类别
    //@ApiModelProperty(value="categoryAlias",hidden=true)
    private String categoryAlias;	//暂时没用到   组件类别别名，用于前端分组展示


    //@ApiModelProperty(value="组件类型，发布的一般都是数据分析类",name="type",example="analyzer" )
    private String type;//e or t or l ---ComponentType

    //@ApiModelProperty(value="模型类别",name="modelType",example="聚类" )
    private String modelType; // 分类、回归等模型子类

    //@ApiModelProperty(value="算法唯一标识",name="algorithm",example="samplestreamop" )
    private String algorithm; //算法，用于全局唯一标识一个算法，方便flink调用

    //@ApiModelProperty(value="other",hidden=true)
    private String other;//其他附加信息，
    //@ApiModelProperty(value="createTime",hidden=true)
    private Date createTime; //创建时间

    //@ApiModelProperty(value="组件属性窗口定义",name="viewParameter",example="json串",required=true)
    @DSColumnType(ColumnType.Object)
    @DSColumnSize(10240)
    private Object viewParameter;      //组件所需参数 add 2017.11.17
    //@ApiModelProperty(hidden=true)
    private boolean columnConfig = true;      //对于数据源组件，确定是否需要列配置信息，默认都有

    //@ApiModelProperty(value="模型文件路径，本地相对路径",name="modelLocalPath",example="linear_out15.csv",required=true)
    private String modelLocalPath;   //模型的本地路径，相对路径，文件名即可
    //@ApiModelProperty(value="modelPublishPath",hidden=true)
    private String modelPublishPath; //模型转成DataSong文件存储后的路径，方便flink中调用

    //@ApiModelProperty(value="模型所属行业id",name="industryId",example="l15846914636678uIn4Lkr4z99NKqQ_O3Gfh" ,required=true)
    private String industryId;

    //@ApiModelProperty(value="发布者id",name="userId",example="l15846914636678uIn4Lkr4z99NKqQ_O3Gfh" )
    private String userId;  //应该从session中拿

    //@ApiModelProperty(value="运行模式，如flink等，如果为空说明在三种运行模式下都可以执行",name="executeMode",example="flink,docker" )
    private String executeMode ;

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String getEntryClassName() {
        return entryClassName;
    }

    public void setEntryClassName(String entryClassName) {
        this.entryClassName = entryClassName;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getCategoryAlias() {
        return categoryAlias;
    }

    public void setCategoryAlias(String categoryAlias) {
        this.categoryAlias = categoryAlias;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getModelType() {
        return modelType;
    }

    public void setModelType(String modelType) {
        this.modelType = modelType;
    }

    public String getAlgorithm() {
        return algorithm;
    }

    public void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Object getViewParameter() {
        return viewParameter;
    }

    public void setViewParameter(Object viewParameter) {
        this.viewParameter = viewParameter;
    }

    public boolean isColumnConfig() {
        return columnConfig;
    }

    public void setColumnConfig(boolean columnConfig) {
        this.columnConfig = columnConfig;
    }

    public String getModelLocalPath() {
        return modelLocalPath;
    }

    public void setModelLocalPath(String modelLocalPath) {
        this.modelLocalPath = modelLocalPath;
    }

    public String getModelPublishPath() {
        return modelPublishPath;
    }

    public void setModelPublishPath(String modelPublishPath) {
        this.modelPublishPath = modelPublishPath;
    }

    public String getIndustryId() {
        return industryId;
    }

    public void setIndustryId(String industryId) {
        this.industryId = industryId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getExecuteMode() {
        return executeMode;
    }

    public void setExecuteMode(String executeMode) {
        this.executeMode = executeMode;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }
}
